{% extends "analysis_plugins/general_information.html" %}

{% block analysis_result_details %}

    {% for type_, result_list in analysis_result.items() %}
        {% if result_list %}
        <tr>
            <td>{{ type_ }} Credentials:</td>
            <td class="p-0">
                {% for item in result_list %}
                    <table class="table table-sm mb-0">
                        <tr>
                            {% if item.password %}
                                <td style="width: 120px">{{ item.username }}:{{ item.password }}</td>
                            {% else %}
                                <td style="width: 120px">{{ item.username }}</td>
                            {% endif %}
                            <td class="p-0">
                                <table class="table table-sm mb-0">
                                    <tr>
                                        <td style="width: 120px">Username:</td>
                                        <td>{{ item.username }}</td>
                                    </tr>
                                    {% if item.password %}
                                        <tr class="table-danger">
                                            <td style="width: 120px">Password:</td>
                                            <td>{{ item.password }}</td>
                                        </tr>
                                    {% elif item.error %}
                                        <tr class="table-warning">
                                            <td style="width: 120px">Error:</td>
                                            <td>{{ item.error }}</td>
                                        </tr>
                                    {% endif %}
                                    <tr>
                                        <td style="width: 120px">Full Entry:</td>
                                        <td>{{ item.full_entry }}</td>
                                    </tr>
                                    {% if item.password_hash | length > 1 %}
                                        <tr>
                                            <td style="width: 120px">Password Hash:</td>
                                            <td>{{ item.password_hash }}</td>
                                        </tr>
                                    {% endif %}
                                </table>
                            </td>
                        </tr>
                    </table>
                {% endfor %}
            </td>
        </tr>
        {% endif %}
    {% endfor %}

{% endblock %}
